﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TarreOA.TarreOADAL;
using System.Data.SqlClient;
public partial class page_NewsManageIFrame : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //首先得到用户权限 

        if (!IsPostBack)
        {

            //
            GVNewsManager.DataSource = this.getDataSet();
            //        GridView1.DataKeyNames = new string[] { "id" };
            GVNewsManager.DataBind();
        }
    }
    protected DataSet getDataSet()
    {
        //首先得到用户权限 



        //



        SqlConnection conn = SQLManager.GetConn();
        SqlDataAdapter myda = new SqlDataAdapter("SELECT Title, Id, IssueTime, State, SectionId, IssueUser FROM News", conn);
        DataSet myds = new DataSet();
        myda.Fill(myds, "lis");
        conn.Close();
        return myds;

    }


    protected void GVNewsManager_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        //Label1.Text = "aaaaa";
    }
}
